package edu.eece261.fall11.server;

import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class User {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String Username;
    
    @Persistent
    private String Password;
    
    @Persistent
    private String Name;
    
    @Persistent
    private String Email;
    
    public User(String username, String password, String name, String email) {
        Username = username;
        Password = password;
        Name = name;
        Email = email;
    }

    public Key getKey() {
        return key;
    }

    public String getUsername() {
        return Username;
    }

    public String getPassword() {
        return Password;
    }
    
    public String getName() {
    	return Name;
    }
    
    public String getEmail() {
    	return Email;
    }

    public User setUsername(String username) {
        this.Username = username;
        return this;
    }

    public User setPassword(String password) {
        this.Password = password;
        return this;
    }
    
    public User setName(String name) {
    	this.Name = name;
    	return this;
    }
    
    public User setEmail(String email) {
    	this.Email = email;
    	return this;
    }
}